<?php TPL::output('install/header.tpl.htm'); ?>

<p class="default_head"><span class="default_logo"></span> </p>
<div class="default_contents">
  <h2 class="dedault_hx"> • 配置系统</h2>
  <p class="default_txt">需要您提供必要的系统配置信息</p>
  
  <?php if ($this->error_messages) { ?>
  <div class="default_error">
  	<h3>请修正问题后继续</h3>
  	<p>
  		<?php foreach ($this->error_messages AS $error_message) { ?>
  			<?php echo $error_message; ?><br />
  		<?php } ?>
  		</p>
  </div>
  <?php } else { ?>
  <form action="" method="post" id="installer">
  <input type="hidden" name="step" value="3" />
  <ul class="default_ul">
  	<li style="display:none">
  	  <label class="label">数据库驱动</label>
  	  <select name="db_driver">
		<?php if ($this->mysqi_support) { ?>
		<option value="MySQLi" selected="selected">MySQLi (内存占用较低)</option>
		<?php } ?>
		<?php if ($this->pdo_support) { ?>
  	  	<option value="PDO_MYSQL">PDO (推荐, 性能更强)</option>
		<?php } ?>
  	  </select>
  	  <span class="txt_color">请根据服务器状态选择数据库驱动</span>
  	</li>
    <li>
      <label class="label">数据库主机</label>
      <input type="text" name="db_host" value="localhost" class="default_text"/>
      <span class="txt_color">通常为 localhost</span>
    </li>
    <li>
      <label class="label">数据库用户名</label>
      <input type="text" name="db_username" value="" class="default_text"/>
    </li>
    <li>
      <label class="label">数据库密码</label>
      <input type="text" name="db_password" class="default_text"/>
    </li>
    <li>
      <label class="label">数据库名称</label>
      <input type="text" name="db_dbname" class="default_text"/>
    </li>
    <li>
      <label class="label">数据表前缀</label>
      <input type="text" name="db_prefix" value="aws_" class="default_text"/>
      <span class="txt_color">同数据库安装多个本程序时需要更改</span>
    </li>
    
    <li class="default_setup_n" id="setup_control"><a href="#" class="default_install" onclick="document.getElementById('installer').submit(); document.getElementById('setup_control').style.display = 'none'; return false;">开始安装</a></li>
  </ul>
  </form>
  <?php } ?>
</div>

<?php TPL::output('install/footer.tpl.htm'); ?>